package com.serviceprovider.business.module.sp.payee.services.dao.interfaces;

//~--- non-JDK imports --------------------------------------------------------

import com.serviceprovider.business.module.sp.payee.model.Payee;

//~--- JDK imports ------------------------------------------------------------

import java.util.List;

/**
 * This class manages various payee operations.
 */
public interface IPayeeService {

    /**
     * Finds all users of the system.
     * @return list of all users.
     */
    List<Payee> findAll();

    /**
     * Finds all users belong to a specific role
     * @param roleId Role id
     */
    List<Payee> findByRole(int roleId);

    /**
     * Inserts new user.
     * @param user user to be inserted.
     */
    void save(Payee payee);

    /**
     * @param payee
     */
    void updatePayeeActiveFlag(Payee payee);

    /**
     * Removes existing user.
     * @param id id of the user to be removed.
     */
    void remove(int id);

    /**
     * Finds payee by id.
     * @param id id of the user.
     * @return payee found or null if doesn't exist.
     */
    Payee getById(int id);

    /**
     * Finds payee by email.
     * @param email email of the payee.
     * @return payee found or null if doesn't exist.
     */
    Payee getByEmail(String email);

    /**
     * Finds payee by email GUID.
     * @param emailGUID email GUID of the payee.
     * @return payee found or null if doesn't exist.
     */
    Payee getByEmailGUID(String emailGUID);

    /**
     * @param user
     */
    void deleteEmailGUID(Payee payee);

    List<Payee> findByRoleAndSP(Integer roleID, int sp_id);
}



